package com.lishem.rpc.client.channel;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用于存储远程提供服务的地址数据
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProviderService implements Serializable {
    private String serverIp; // 提供服务的ip
    private int serverPort; // 服务端口
    private int networkPort; // Http端口

    private long timeout;
    // the weight of service provider
    private int weight = 10; // 负载均衡权重

    // 服务注册时间
    private long registerTime = System.currentTimeMillis();
}